import { registerFormDetailProvider } from '@ibiz-template/runtime';
import { withInstall } from '@ibiz-template/vue3-util';
import { App } from 'vue';
import FormMDCtrl from './form-mdctrl';
import FormMDCtrlDataView from './form-mdctrl-data-view/form-mdctrl-data-view';
import FormMDCtrlForm from './form-mdctrl-form/form-mdctrl-form';
import FormMDCtrlGrid from './form-mdctrl-grid/form-mdctrl-grid';
import FormMDCtrlList from './form-mdctrl-list/form-mdctrl-list';
import FormMDCtrlRepeaterFormOne from './form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one';
import FormMDCtrlRepeaterForm from './form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form';
import FormMDCtrlRepeaterGrid from './form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid';
import { FormMDCtrlProvider } from './form-mdctrl.provider';

export * from './form-mdctrl.provider';
export * from './form-mdctrl.state';
export * from './form-mdctrl.controller';

export const IBizFormMDCtrl = withInstall(FormMDCtrl, function (v: App) {
  v.component(FormMDCtrl.name, FormMDCtrl);
  v.component(FormMDCtrlForm.name, FormMDCtrlForm);
  v.component(FormMDCtrlGrid.name, FormMDCtrlGrid);
  v.component(FormMDCtrlList.name, FormMDCtrlList);
  v.component(FormMDCtrlDataView.name, FormMDCtrlDataView);
  v.component(FormMDCtrlRepeaterForm.name, FormMDCtrlRepeaterForm);
  v.component(FormMDCtrlRepeaterFormOne.name, FormMDCtrlRepeaterFormOne);
  v.component(FormMDCtrlRepeaterGrid.name, FormMDCtrlRepeaterGrid);
  registerFormDetailProvider('MDCTRL', () => new FormMDCtrlProvider());
});

export default IBizFormMDCtrl;
